﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_KetChuyenCacKhoanGiamTruVaThue : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("CmdExit")]
        private Button _CmdExit;
        [AccessedThroughProperty("CmdGhiSo")]
        private Button _CmdGhiSo;
        [AccessedThroughProperty("CmdHuy")]
        private Button _CmdHuy;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("GroupBox2")]
        private GroupBox _GroupBox2;
        [AccessedThroughProperty("ImageList1")]
        private ImageList _ImageList1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("TxtTongPhatSinhGiamTru")]
        private C1NumericEdit _TxtTongPhatSinhGiamTru;
        [AccessedThroughProperty("TxtTongPhatSinhGiamTruThue")]
        private C1NumericEdit _TxtTongPhatSinhGiamTruThue;
        [AccessedThroughProperty("VSKetChuyenGiamTru")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSKetChuyenGiamTru;
        [AccessedThroughProperty("VSKetChuyenKhauTruThue")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSKetChuyenKhauTruThue;
        private string cFrmFormat;
        private string cFrmKhoaChungTuDT;
        private string cFrmKhoaChungTuTA;
        private string cFrmNamThang;
        private string cFrmNgayChungTu;
        private string cFrmSoChungTuDT;
        private string cFrmSoChungTuTA;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private clsKetChuyenChiPhi objCP;
        private clsKetChuyenChiPhi objThue;

        public Frm_KetChuyenCacKhoanGiamTruVaThue()
        {
            base.Load += new EventHandler(this.Frm_KetChuyenCacKhoanGiamTruVaThue_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmNamThang = "";
            this.cFrmFormat = "";
            this.objCP = new clsKetChuyenChiPhi();
            this.objThue = new clsKetChuyenChiPhi();
            this.InitializeComponent();
        }

        public bool CheckGrid()
        {
            int num2 = this.VSKetChuyenGiamTru.Rows.Count - 1;
            for (int i = 0; i <= num2; i++)
            {
                if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSKetChuyenGiamTru[i, 1]), "", modGeneral.TypeOfValue.Nothing), "", false))
                {
                    return false;
                }
            }
            return true;
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdGhiSo_Click(object sender, EventArgs e)
        {
            this.GhiSoGiamTru();
            this.GhiSoThueKhauTru();
            LVYModule.ShowWarning(modGeneral.Tranlated("Đ\x00e3 thực hiện xong nghiệp vụ kết chuyển !", ""));
            this.CmdHuy.Enabled = true;
            this.CmdGhiSo.Enabled = false;
        }

        private void CmdHuy_Click(object sender, EventArgs e)
        {
            if (!this.objCP.DelData(this.cFrmKhoaChungTuDT))
            {
                LVYModule.ShowWarning("Qu\x00e1 tr\x00ecnh hủy ghi sổ kết chuyển giảm doanh thu gặp vấn đề. Xin li\x00ean người quản trị phần mềm !");
            }
            else if (!this.objCP.DelData(this.cFrmKhoaChungTuTA))
            {
                LVYModule.ShowWarning("Qu\x00e1 tr\x00ecnh hủy ghi sổ kết chuyển thuế gặp vấn đề. Xin li\x00ean người quản trị phần mềm !");
            }
            else
            {
                LVYModule.ShowWarning("Hủy ghi sổ kết chuyến thuế v\x00e0 doanh thu th\x00e0nh c\x00f4ng !");
                this.LoadCacKhoanGiamTruDoanhThu();
                this.LoadCacKhoanKhauTruThue();
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing && (this.components != null))
                {
                    this.components.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }

        private void Frm_KetChuyenCacKhoanGiamTruVaThue_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                if (LVYModule.ReturnIfNull(this.cFrmNamThang, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.cFrmNamThang = SearchModule.GetNamThang("");
                }
                if (LVYModule.ReturnIfNull(this.cFrmNamThang, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.Dispose();
                }
                else
                {
                    string pDate = this.cFrmNamThang.Trim() + LVYModule.sRight("00" + Conversions.ToString(DateTime.DaysInMonth(Conversions.ToInteger(LVYModule.sLeft(this.cFrmNamThang, 4)), Conversions.ToInteger(LVYModule.sRight(this.cFrmNamThang, 2)))), 2);
                    this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                    if (!LVYModule.CheckDateLock(pDate))
                    {
                        this.Dispose();
                    }
                    else
                    {
                        this.cFrmKhoaChungTuDT = modGeneral.H_PREFIX + "DT" + LVYModule.sRight("000000000000000" + this.cFrmNamThang, 11);
                        this.cFrmSoChungTuDT = "DT-" + this.cFrmNamThang;
                        this.cFrmKhoaChungTuTA = modGeneral.H_PREFIX + "TA" + LVYModule.sRight("000000000000000" + this.cFrmNamThang, 11);
                        this.cFrmSoChungTuTA = "TA-" + this.cFrmNamThang;
                        this.cFrmNgayChungTu = Conversions.ToString(DateTime.DaysInMonth(Conversions.ToInteger(LVYModule.sLeft(this.cFrmNamThang, 4)), Conversions.ToInteger(LVYModule.sRight(this.cFrmNamThang, 2)))) + "/" + LVYModule.sRight(this.cFrmNamThang, 2) + "/" + LVYModule.sLeft(this.cFrmNamThang, 4);
                        this.LoadCacKhoanGiamTruDoanhThu();
                        this.LoadCacKhoanKhauTruThue();
                    }
                }
            }
        }

        public DataTable GetCacKhoanGiamDoanhThuDaKetChuyen(string pNamThang)
        {
            DataTable table;
            IDataParameter[] parameterArray = new IDataParameter[3];
            try
            {
                string commandText = "";
                commandText = "SELECT ##RE.KhoaTaiKhoanCo as KhoaTKGiam, TKG.SoTaiKhoan as TaiKhoanGiam, ##RE.KhoaTaiKhoanNo as KhoaTKDoanhThu, TKDT.SoTaiKhoan as TaiKhoanDoanhThu, ##RE.KhoaBoPhanNo as KhoaBoPhan, BP.TenViet as BoPhan, ##RE.KhoaHopDongNo as  KhoaHopDong, HD.SoHopDong as HopDong, ##RE.KhoaSanPhamNo as KhoaSanPham, Sp.TenViet as SanPham, Sum(##RE.SoPhatSinhNT) as SoPhatSinhNT, Sum(##RE.SoPhatSinh) as SoPhatSinh FROM GL_NhatKyChungTu ##RE LEFT JOIN DM_TaiKhoan TKG ON ##RE.KhoaTaiKhoanCo = TKG.Khoa LEFT JOIN DM_TaiKhoan TKDT ON ##RE.KhoaTaiKhoanNo = TKDT.Khoa LEFT JOIN DM_DonViBoPhan BP ON ##RE.KhoaBoPhanNo = BP.Khoa LEFT JOIN DM_HopDong HD ON ##RE.KhoaHopDongNo = HD.Khoa LEFT JOIN DM_SanPhamCongViec SP ON ##RE.KhoaSanPhamNo = SP.Khoa WHERE ##RE.KhoaTaiKhoanNo IN ( SELECT Khoa FROM DM_TaiKhoan WHERE SoTaiKhoan IN ('5111') ) AND ##RE.KhoaTaiKhoanCo IN (SELECT Khoa FROM DM_TaiKhoan WHERE Left(SoTaiKhoan,3) IN ('521', '531', '532')) AND ##RE.NamThang = '201011'GROUP BY  ##RE.KhoaTaiKhoanCo, ##RE.KhoaBoPhanNo, ##RE.KhoaHopDongNo, ##RE.KhoaSanPhamNo, ##RE.KhoaTaiKhoanNo , TKG.SoTaiKhoan , TKDT.SoTaiKhoan, BP.TenViet, ##RE.KhoaHopDongNo,  HD.SoHopDong,  ##RE.KhoaSanPhamNo,  Sp.TenViet ";
                table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.Text, commandText, new IDataParameter[0]).Tables[0];
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                table = null;
                ProjectData.ClearProjectError();
                return table;
                ProjectData.ClearProjectError();
            }
            return table;
        }

        public DataTable GetCacKhoanGiamTruDoanhThu(string pNamThang)
        {
            DataTable table;
            IDataParameter[] commandParameters = new IDataParameter[3];
            try
            {
                commandParameters[0] = DBHelper.createParameter("@NamThang", DbType.Int64, ParameterDirection.Input, pNamThang);
                commandParameters[1] = DBHelper.createParameter("@KhoaDonVi", DbType.Int64, ParameterDirection.Input, modGeneral.H_CLIENT);
                commandParameters[2] = DBHelper.createParameter("@pError", DbType.Int64, ParameterDirection.Input, 0);
                table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.StoredProcedure, "GL_sp_GetKhoanGiamTruDoanhThu", commandParameters).Tables[0];
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                table = null;
                ProjectData.ClearProjectError();
                return table;
                ProjectData.ClearProjectError();
            }
            return table;
        }

        public DataTable GetCacKhoanGiamTruDoanhThuDaKetChuyen(string pNamThang)
        {
            DataTable table;
            string commandText = "";
            commandText = "SELECT ##RE.KhoaTaiKhoanCo as KhoaTKGiam, TKG.SoTaiKhoan as TaiKhoanGiam, ##RE.KhoaTaiKhoanNo as KhoaTKDoanhThu, TKDT.SoTaiKhoan as TaiKhoanDoanhThu,##RE.KhoaBoPhanNo as KhoaBoPhan, BP.TenViet as BoPhan, ##RE.KhoaHopDongNo as  KhoaHopDong, HD.SoHopDong as HopDong, ##RE.KhoaSanPhamNo as KhoaSanPham, Sp.TenViet as SanPham, Sum(##RE.SoPhatSinhNT) as SoPhatSinhNT, Sum(##RE.SoPhatSinh) as SoPhatSinh FROM GL_NhatKyChungTu ##RE LEFT JOIN DM_TaiKhoan TKG ON ##RE.KhoaTaiKhoanCo = TKG.Khoa LEFT JOIN DM_TaiKhoan TKDT ON ##RE.KhoaTaiKhoanNo = TKDT.Khoa LEFT JOIN DM_DonViBoPhan BP ON ##RE.KhoaBoPhanNo = BP.Khoa LEFT JOIN DM_HopDong HD ON ##RE.KhoaHopDongNo = HD.Khoa LEFT JOIN DM_SanPhamCongViec SP ON ##RE.KhoaSanPhamNo = SP.Khoa WHERE ##RE.KhoaTaiKhoanNo IN ( SELECT Khoa FROM DM_TaiKhoan WHERE SoTaiKhoan IN ('5111') ) AND ##RE.KhoaTaiKhoanCo IN (SELECT Khoa FROM DM_TaiKhoan WHERE Left(SoTaiKhoan,3) IN ('521', '531', '532')) AND ##RE.NamThang = '" + pNamThang + "' GROUP BY  ##RE.KhoaTaiKhoanCo, ##RE.KhoaBoPhanNo, ##RE.KhoaHopDongNo, ##RE.KhoaSanPhamNo, ##RE.KhoaTaiKhoanNo , TKG.SoTaiKhoan , TKDT.SoTaiKhoan, BP.TenViet, ##RE.KhoaHopDongNo,  HD.SoHopDong,  ##RE.KhoaSanPhamNo,  Sp.TenViet ";
            try
            {
                table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.Text, commandText, new IDataParameter[0]).Tables[0];
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                table = null;
                ProjectData.ClearProjectError();
                return table;
                ProjectData.ClearProjectError();
            }
            return table;
        }

        public DataTable GetCacKhoanKhauTruThue(string pNamThang)
        {
            DataTable table;
            IDataParameter[] commandParameters = new IDataParameter[3];
            try
            {
                commandParameters[0] = DBHelper.createParameter("@KhoaDonVi", DbType.Int64, ParameterDirection.Input, modGeneral.H_CLIENT);
                commandParameters[1] = DBHelper.createParameter("@NamThang", DbType.Int64, ParameterDirection.Input, pNamThang);
                commandParameters[2] = DBHelper.createParameter("@Language", DbType.Int64, ParameterDirection.Input, modGeneral.H_LANGUAGE);
                table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.StoredProcedure, "GL_sp_GetKhoanKhauTruThue", commandParameters).Tables[0];
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                table = null;
                ProjectData.ClearProjectError();
                return table;
                ProjectData.ClearProjectError();
            }
            return table;
        }

        public DataTable GetCacKhoanKhauTruThueDaKetChuyen(string pNamThang)
        {
            DataTable table;
            IDataParameter[] parameterArray = new IDataParameter[3];
            try
            {
                string commandText = "";
                commandText = "SELECT NK.KhoaTaiKhoanNo, TKN.SoTaiKhoan as TaiKhoanNo, NK.KhoaTaiKhoanCo, TKC.SoTaiKhoan as TaiKhoanCo, NK.SoPhatSinh, DienGiai FROM GL_NhatKyChungTu NK LEFT JOIN DM_TaiKhoan TKN ON NK.KhoaTaiKhoanNo = TKN.Khoa LEFT JOIN DM_TaiKhoan TKC ON NK.KhoaTaiKhoanCo = TKC.Khoa WHERE KhoaTaiKhoanNo IN ( SELECT Khoa FROM DM_TaiKhoan WHERE SoTaiKhoan IN ('33311') ) AND KhoaTaiKhoanCo IN (SELECT Khoa FROM DM_TaiKhoan WHERE SoTaiKhoan IN ('1331', '1332')) AND NK.NamThang = '" + pNamThang + "'";
                table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.Text, commandText, new IDataParameter[0]).Tables[0];
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                table = null;
                ProjectData.ClearProjectError();
                return table;
                ProjectData.ClearProjectError();
            }
            return table;
        }

        public void GhiSoGiamTru()
        {
            if (!this.CheckGrid())
            {
                MessageBox.Show("C\x00f3 một định khoản kết chuyển thiếu t\x00e0i khoản kết chuyển ! Vui l\x00f2ng chọn t\x00e0i khoản kết chuyển");
            }
            else if (this.SaveTmp() && !this.SaveDT())
            {
            }
        }

        public void GhiSoThueKhauTru()
        {
            if (this.SaveTmpThue() && !this.SaveTA())
            {
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_KetChuyenCacKhoanGiamTruVaThue));
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.GroupBox2 = new GroupBox();
            this.TxtTongPhatSinhGiamTruThue = new C1NumericEdit();
            this.Label4 = new Label();
            this.VSKetChuyenKhauTruThue = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.GroupBox1 = new GroupBox();
            this.TxtTongPhatSinhGiamTru = new C1NumericEdit();
            this.Label1 = new Label();
            this.VSKetChuyenGiamTru = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.CmdExit = new Button();
            this.C1DockingTab1 = new C1DockingTab();
            this.CmdGhiSo = new Button();
            this.ImageList1 = new ImageList(this.components);
            this.Panel1 = new Panel();
            this.CmdHuy = new Button();
            this.C1DockingTabPage1.SuspendLayout();
            this.GroupBox2.SuspendLayout();
            ((ISupportInitialize) this.TxtTongPhatSinhGiamTruThue).BeginInit();
            this.VSKetChuyenKhauTruThue.BeginInit();
            this.GroupBox1.SuspendLayout();
            ((ISupportInitialize) this.TxtTongPhatSinhGiamTru).BeginInit();
            this.VSKetChuyenGiamTru.BeginInit();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.Panel1.SuspendLayout();
            this.SuspendLayout();
            this.C1DockingTabPage1.Controls.Add(this.GroupBox2);
            this.C1DockingTabPage1.Controls.Add(this.GroupBox1);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            Point point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            Size size = new Size(0x37c, 0x1e8);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "F7. Kết chuyển c\x00e1c khoản giảm trừ doanh thu v\x00e0 thuế";
            this.GroupBox2.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.GroupBox2.Controls.Add(this.TxtTongPhatSinhGiamTruThue);
            this.GroupBox2.Controls.Add(this.Label4);
            this.GroupBox2.Controls.Add(this.VSKetChuyenKhauTruThue);
            this.GroupBox2.Dock = DockStyle.Fill;
            point = new Point(0, 0xf4);
            this.GroupBox2.Location = point;
            this.GroupBox2.Name = "GroupBox2";
            size = new Size(0x37c, 0xf4);
            this.GroupBox2.Size = size;
            this.GroupBox2.TabIndex = 4;
            this.GroupBox2.TabStop = false;
            this.GroupBox2.Text = "Kết chuyển thuế khấu trừ";
            this.TxtTongPhatSinhGiamTruThue.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongPhatSinhGiamTruThue.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x2f9, 0xde);
            this.TxtTongPhatSinhGiamTruThue.Location = point;
            this.TxtTongPhatSinhGiamTruThue.Name = "TxtTongPhatSinhGiamTruThue";
            Padding padding = new Padding(1);
            this.TxtTongPhatSinhGiamTruThue.Padding = padding;
            this.TxtTongPhatSinhGiamTruThue.ReadOnly = true;
            size = new Size(0x71, 20);
            this.TxtTongPhatSinhGiamTruThue.Size = size;
            this.TxtTongPhatSinhGiamTruThue.TabIndex = 0x5b;
            this.TxtTongPhatSinhGiamTruThue.Tag = null;
            this.TxtTongPhatSinhGiamTruThue.TextAlign = HorizontalAlignment.Right;
            this.TxtTongPhatSinhGiamTruThue.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongPhatSinhGiamTruThue.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongPhatSinhGiamTruThue.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label4.AutoEllipsis = true;
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            this.Label4.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xa3);
            point = new Point(0x2ae, 0xe1);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            this.Label4.RightToLeft = RightToLeft.No;
            size = new Size(0x44, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x59;
            this.Label4.Text = "Tổng cộng";
            this.Label4.TextAlign = ContentAlignment.TopRight;
            this.VSKetChuyenKhauTruThue.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSKetChuyenKhauTruThue.ColumnInfo = manager.GetString("VSKetChuyenKhauTruThue.ColumnInfo");
            this.VSKetChuyenKhauTruThue.Dock = DockStyle.Top;
            this.VSKetChuyenKhauTruThue.ExtendLastCol = true;
            this.VSKetChuyenKhauTruThue.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(3, 0x10);
            this.VSKetChuyenKhauTruThue.Location = point;
            this.VSKetChuyenKhauTruThue.Name = "VSKetChuyenKhauTruThue";
            this.VSKetChuyenKhauTruThue.Rows.Count = 1;
            this.VSKetChuyenKhauTruThue.Rows.DefaultSize = 0x11;
            size = new Size(0x376, 0xcb);
            this.VSKetChuyenKhauTruThue.Size = size;
            this.VSKetChuyenKhauTruThue.StyleInfo = manager.GetString("VSKetChuyenKhauTruThue.StyleInfo");
            this.VSKetChuyenKhauTruThue.TabIndex = 0x15;
            this.VSKetChuyenKhauTruThue.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.GroupBox1.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.GroupBox1.Controls.Add(this.TxtTongPhatSinhGiamTru);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.VSKetChuyenGiamTru);
            this.GroupBox1.Dock = DockStyle.Top;
            point = new Point(0, 0);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(0x37c, 0xf4);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 2;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "Kết chuyển c\x00e1c khoản giảm trừ doanh thu";
            this.TxtTongPhatSinhGiamTru.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongPhatSinhGiamTru.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x2f7, 0xdd);
            this.TxtTongPhatSinhGiamTru.Location = point;
            this.TxtTongPhatSinhGiamTru.Name = "TxtTongPhatSinhGiamTru";
            padding = new Padding(1);
            this.TxtTongPhatSinhGiamTru.Padding = padding;
            this.TxtTongPhatSinhGiamTru.ReadOnly = true;
            size = new Size(0x70, 20);
            this.TxtTongPhatSinhGiamTru.Size = size;
            this.TxtTongPhatSinhGiamTru.TabIndex = 0x5b;
            this.TxtTongPhatSinhGiamTru.Tag = null;
            this.TxtTongPhatSinhGiamTru.TextAlign = HorizontalAlignment.Right;
            this.TxtTongPhatSinhGiamTru.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongPhatSinhGiamTru.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongPhatSinhGiamTru.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label1.AutoEllipsis = true;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            this.Label1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xa3);
            point = new Point(0x2ac, 0xe0);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            this.Label1.RightToLeft = RightToLeft.No;
            size = new Size(0x44, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x59;
            this.Label1.Text = "Tổng cộng";
            this.Label1.TextAlign = ContentAlignment.TopRight;
            this.VSKetChuyenGiamTru.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSKetChuyenGiamTru.ColumnInfo = manager.GetString("VSKetChuyenGiamTru.ColumnInfo");
            this.VSKetChuyenGiamTru.Dock = DockStyle.Top;
            this.VSKetChuyenGiamTru.ExtendLastCol = true;
            this.VSKetChuyenGiamTru.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(3, 0x10);
            this.VSKetChuyenGiamTru.Location = point;
            this.VSKetChuyenGiamTru.Name = "VSKetChuyenGiamTru";
            this.VSKetChuyenGiamTru.Rows.Count = 1;
            this.VSKetChuyenGiamTru.Rows.DefaultSize = 0x11;
            size = new Size(0x376, 0xcb);
            this.VSKetChuyenGiamTru.Size = size;
            this.VSKetChuyenGiamTru.StyleInfo = manager.GetString("VSKetChuyenGiamTru.StyleInfo");
            this.VSKetChuyenGiamTru.TabIndex = 0x15;
            this.VSKetChuyenGiamTru.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.CmdExit.Image = ACCOUNTING.My.Resources.Resources.Closed;
            this.CmdExit.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x31c, 5);
            this.CmdExit.Location = point;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x5f, 0x19);
            this.CmdExit.Size = size;
            this.CmdExit.TabIndex = 11;
            this.CmdExit.Text = "&Tho\x00e1t";
            this.CmdExit.UseVisualStyleBackColor = true;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Dock = DockStyle.Fill;
            point = new Point(0, 0);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            this.C1DockingTab1.SelectedIndex = 2;
            size = new Size(0x37e, 0x202);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 0x5e;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.CmdGhiSo.Image = (Image) manager.GetObject("CmdGhiSo.Image");
            this.CmdGhiSo.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x2b7, 6);
            this.CmdGhiSo.Location = point;
            this.CmdGhiSo.Name = "CmdGhiSo";
            size = new Size(0x5f, 0x19);
            this.CmdGhiSo.Size = size;
            this.CmdGhiSo.TabIndex = 9;
            this.CmdGhiSo.Text = "&Ghi sổ";
            this.CmdGhiSo.UseVisualStyleBackColor = true;
            this.ImageList1.ImageStream = (ImageListStreamer) manager.GetObject("ImageList1.ImageStream");
            this.ImageList1.TransparentColor = Color.Transparent;
            this.ImageList1.Images.SetKeyName(0, "orders_main.png");
            this.ImageList1.Images.SetKeyName(1, "checkingacct.png");
            this.ImageList1.Images.SetKeyName(2, "billing.png");
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.CmdExit);
            this.Panel1.Controls.Add(this.CmdHuy);
            this.Panel1.Controls.Add(this.CmdGhiSo);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new Point(0, 0x202);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x37e, 0x21);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x5f;
            this.CmdHuy.Image = ACCOUNTING.My.Resources.Resources.Closed;
            this.CmdHuy.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x247, 6);
            this.CmdHuy.Location = point;
            this.CmdHuy.Name = "CmdHuy";
            size = new Size(0x6a, 0x19);
            this.CmdHuy.Size = size;
            this.CmdHuy.TabIndex = 9;
            this.CmdHuy.Text = "&Hủy ghi sổ";
            this.CmdHuy.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x37e, 0x223);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.Panel1);
            this.Name = "Frm_KetChuyenCacKhoanGiamTruVaThue";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "TH-0020";
            this.Text = "KET CHUYEN CAC KHOAN GIAM TRU VA THUE";
            this.C1DockingTabPage1.ResumeLayout(false);
            this.GroupBox2.ResumeLayout(false);
            this.GroupBox2.PerformLayout();
            ((ISupportInitialize) this.TxtTongPhatSinhGiamTruThue).EndInit();
            this.VSKetChuyenKhauTruThue.EndInit();
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            ((ISupportInitialize) this.TxtTongPhatSinhGiamTru).EndInit();
            this.VSKetChuyenGiamTru.EndInit();
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.Panel1.ResumeLayout(false);
            this.ResumeLayout(false);
        }

        public void LoadCacKhoanGiamTruDoanhThu()
        {
            DataTable cacKhoanGiamDoanhThuDaKetChuyen = this.GetCacKhoanGiamDoanhThuDaKetChuyen(this.cFrmNamThang);
            if ((cacKhoanGiamDoanhThuDaKetChuyen == null) | (cacKhoanGiamDoanhThuDaKetChuyen.Rows.Count == 0))
            {
                cacKhoanGiamDoanhThuDaKetChuyen = this.GetCacKhoanGiamTruDoanhThu(this.cFrmNamThang);
            }
            this.VSKetChuyenGiamTru.Rows.Count = 1;
            C1.Win.C1FlexGrid.C1FlexGrid vSKetChuyenGiamTru = this.VSKetChuyenGiamTru;
            int num2 = cacKhoanGiamDoanhThuDaKetChuyen.Rows.Count - 1;
            for (int i = 0; i <= num2; i++)
            {
                vSKetChuyenGiamTru.AddItem("");
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["KhoaTKGiam"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["TaiKhoanGiam"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["KhoaBoPhan"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["BoPhan"]);
                if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["KhoaTKDoanhThu"]), "", modGeneral.TypeOfValue.Nothing), "", false))
                {
                    vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 0] = new clsDMTaiKhoan().GetTaiKhoan("5111");
                    vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 1] = "5111";
                    LVYModule.SetColorForGrid(this.VSKetChuyenGiamTru, Color.Aqua, vSKetChuyenGiamTru.Rows.Count - 1, 0, 0, 0);
                }
                else
                {
                    vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["KhoaTKDoanhThu"]);
                    vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["TaiKhoanDoanhThu"]);
                }
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["KhoaHopDong"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["HopDong"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["KhoaSanPham"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["SanPham"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(cacKhoanGiamDoanhThuDaKetChuyen.Rows[i]["SoPhatSinh"]);
                vSKetChuyenGiamTru[vSKetChuyenGiamTru.Rows.Count - 1, 10] = "Kết chuyển giảm trừ doanh thu";
            }
            vSKetChuyenGiamTru.Cols[0].Visible = false;
            vSKetChuyenGiamTru.Cols[2].Visible = false;
            vSKetChuyenGiamTru.Cols[4].Visible = false;
            vSKetChuyenGiamTru.Cols[6].Visible = false;
            vSKetChuyenGiamTru.Cols[8].Visible = false;
            vSKetChuyenGiamTru = null;
            this.TxtTongPhatSinhGiamTru.Value = LVYModule.SumColGrid(this.VSKetChuyenGiamTru, 11);
        }

        public void LoadCacKhoanKhauTruThue()
        {
            DataTable cacKhoanKhauTruThueDaKetChuyen = this.GetCacKhoanKhauTruThueDaKetChuyen(this.cFrmNamThang);
            if ((cacKhoanKhauTruThueDaKetChuyen == null) | (cacKhoanKhauTruThueDaKetChuyen.Rows.Count == 0))
            {
                cacKhoanKhauTruThueDaKetChuyen = this.GetCacKhoanKhauTruThue(this.cFrmNamThang);
                this.CmdHuy.Enabled = false;
                this.CmdGhiSo.Enabled = true;
            }
            else
            {
                this.CmdHuy.Enabled = true;
                this.CmdGhiSo.Enabled = false;
            }
            this.VSKetChuyenKhauTruThue.DataSource = cacKhoanKhauTruThueDaKetChuyen;
            C1.Win.C1FlexGrid.C1FlexGrid vSKetChuyenKhauTruThue = this.VSKetChuyenKhauTruThue;
            vSKetChuyenKhauTruThue.Cols[0].Visible = false;
            vSKetChuyenKhauTruThue.Cols[2].Visible = false;
            vSKetChuyenKhauTruThue.Cols[1].Caption = "T\x00e0i khoản Nợ";
            vSKetChuyenKhauTruThue.Cols[3].Caption = "T\x00e0i khoản C\x00f3";
            vSKetChuyenKhauTruThue.Cols[4].Caption = "Ph\x00e1t sinh";
            vSKetChuyenKhauTruThue.Cols[4].Format = this.cFrmFormat;
            vSKetChuyenKhauTruThue.Cols[5].Caption = "Diễn giải";
            vSKetChuyenKhauTruThue = null;
            this.TxtTongPhatSinhGiamTruThue.Value = LVYModule.SumColGrid(this.VSKetChuyenKhauTruThue, 4);
        }

        public bool SaveDT()
        {
            this.objCP.KhoaChungTu = this.cFrmKhoaChungTuDT;
            return this.objCP.Save();
        }

        public bool SaveTA()
        {
            this.objCP.KhoaChungTu = this.cFrmKhoaChungTuTA;
            return this.objCP.Save();
        }

        public bool SaveThue()
        {
            return true;
        }

        public bool SaveTmp()
        {
            int num = 0;
            clsKetChuyenChiPhi objCP = this.objCP;
            int num4 = this.VSKetChuyenGiamTru.Rows.Count - 1;
            for (num = 1; num <= num4; num++)
            {
                this.objCP.NamThang = this.cFrmNamThang;
                this.objCP.KhoaChungTu = this.cFrmKhoaChungTuDT;
                this.objCP.SoChungTu = this.cFrmSoChungTuDT;
                this.objCP.NgayChungTu = LVYModule.Date2Char(this.cFrmNgayChungTu);
                this.objCP.KhoaTaiKhoanNo = Conversions.ToString(this.VSKetChuyenGiamTru[num, 0]);
                this.objCP.KhoaTaiKhoanCo = Conversions.ToString(this.VSKetChuyenGiamTru[num, 2]);
                this.objCP.KhoaDoiTuongNo = "";
                this.objCP.KhoaBoPhanNo = Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSKetChuyenGiamTru[num, 4]), "", modGeneral.TypeOfValue.Nothing));
                this.objCP.KhoaSanPhamNo = Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSKetChuyenGiamTru[num, 8]), "", modGeneral.TypeOfValue.Nothing));
                this.objCP.KhoaHopDongNo = Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSKetChuyenGiamTru[num, 6]), "", modGeneral.TypeOfValue.Nothing));
                this.objCP.KhoaKhoanMucNo = "";
                this.objCP.KhoaDoiTuongCo = "";
                this.objCP.KhoaBoPhanCo = "";
                this.objCP.KhoaSanPhamCo = "";
                this.objCP.KhoaHopDongCo = "";
                this.objCP.KhoaKhoanMucCo = "";
                this.objCP.LoaiTien = "VND";
                this.objCP.TyGia = 1.0;
                this.objCP.SoPhatSinhNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSKetChuyenGiamTru[num, 11]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCP.SoPhatSinh = this.objCP.SoPhatSinhNT;
                this.objCP.DienGiai = Conversions.ToString(this.VSKetChuyenGiamTru[num, 10]);
                this.objCP.KhoaDonVi = modGeneral.H_CLIENT;
                this.objCP.Send = 0;
                if (!objCP.SaveTmp())
                {
                    return false;
                }
            }
            objCP = null;
            return true;
        }

        public bool SaveTmpThue()
        {
            int num = 0;
            clsKetChuyenChiPhi objCP = this.objCP;
            int num2 = this.VSKetChuyenKhauTruThue.Rows.Count - 1;
            for (num = 1; num <= num2; num++)
            {
                this.objCP.NamThang = this.cFrmNamThang;
                this.objCP.KhoaChungTu = this.cFrmKhoaChungTuTA;
                this.objCP.SoChungTu = this.cFrmSoChungTuTA;
                this.objCP.NgayChungTu = LVYModule.Date2Char(this.cFrmNgayChungTu);
                this.objCP.KhoaTaiKhoanNo = Conversions.ToString(this.VSKetChuyenKhauTruThue[num, 0]);
                this.objCP.KhoaTaiKhoanCo = Conversions.ToString(this.VSKetChuyenKhauTruThue[num, 2]);
                this.objCP.KhoaDoiTuongNo = "";
                this.objCP.KhoaBoPhanNo = "";
                this.objCP.KhoaSanPhamNo = "";
                this.objCP.KhoaHopDongNo = "";
                this.objCP.KhoaKhoanMucNo = "";
                this.objCP.KhoaDoiTuongCo = "";
                this.objCP.KhoaBoPhanCo = "";
                this.objCP.KhoaSanPhamCo = "";
                this.objCP.KhoaHopDongCo = "";
                this.objCP.KhoaKhoanMucCo = "";
                this.objCP.LoaiTien = "VND";
                this.objCP.TyGia = 1.0;
                this.objCP.SoPhatSinhNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSKetChuyenKhauTruThue[num, 4]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCP.SoPhatSinh = this.objCP.SoPhatSinhNT;
                this.objCP.DienGiai = "Kết chuyển thuế";
                this.objCP.KhoaDonVi = modGeneral.H_CLIENT;
                this.objCP.Send = 0;
                if (!objCP.SaveTmp())
                {
                    return false;
                }
            }
            objCP = null;
            return true;
        }

        private void VSKetChuyenGiamTru_CellButtonClick(object sender, RowColEventArgs e)
        {
            string expression = "";
            if (e.Col == 5)
            {
                this.VSKetChuyenGiamTru[e.Row, 5] = "";
                expression = SearchModule.SearchTaiKhoan(Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSKetChuyenGiamTru[e.Row, 5]), "", modGeneral.TypeOfValue.Nothing)), "5111|5112", "SoTaiKhoan", "", "");
                if (expression != "")
                {
                    object instance = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                    this.VSKetChuyenGiamTru[e.Row, 4] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance, new object[] { 0 }, null));
                    this.VSKetChuyenGiamTru[e.Row, 5] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance, new object[] { 1 }, null));
                    this.VSKetChuyenGiamTru.Select(e.Row, 5);
                }
                else
                {
                    this.VSKetChuyenGiamTru[e.Row, 4] = "";
                    this.VSKetChuyenGiamTru[e.Row, 5] = "";
                }
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual Button CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual Button CmdGhiSo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdGhiSo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdGhiSo_Click);
                if (this._CmdGhiSo != null)
                {
                    this._CmdGhiSo.Click -= handler;
                }
                this._CmdGhiSo = value;
                if (this._CmdGhiSo != null)
                {
                    this._CmdGhiSo.Click += handler;
                }
            }
        }

        internal virtual Button CmdHuy
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdHuy;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdHuy_Click);
                if (this._CmdHuy != null)
                {
                    this._CmdHuy.Click -= handler;
                }
                this._CmdHuy = value;
                if (this._CmdHuy != null)
                {
                    this._CmdHuy.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual GroupBox GroupBox2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox2 = value;
            }
        }

        internal virtual ImageList ImageList1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ImageList1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ImageList1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual C1NumericEdit TxtTongPhatSinhGiamTru
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongPhatSinhGiamTru;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongPhatSinhGiamTru = value;
            }
        }

        internal virtual C1NumericEdit TxtTongPhatSinhGiamTruThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongPhatSinhGiamTruThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongPhatSinhGiamTruThue = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSKetChuyenGiamTru
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSKetChuyenGiamTru;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSKetChuyenGiamTru_CellButtonClick);
                if (this._VSKetChuyenGiamTru != null)
                {
                    this._VSKetChuyenGiamTru.CellButtonClick -= handler;
                }
                this._VSKetChuyenGiamTru = value;
                if (this._VSKetChuyenGiamTru != null)
                {
                    this._VSKetChuyenGiamTru.CellButtonClick += handler;
                }
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSKetChuyenKhauTruThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSKetChuyenKhauTruThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._VSKetChuyenKhauTruThue = value;
            }
        }
    }
}

